package 队列;

public class 报数 {
    public static void main(String[] args) throws Exception {
        int n  =10;
        CirQueue c = new CirQueue(20);
        for (int i = 1; i <= n; i++) {
            c.append(i);
        }
        System.out.println("出队数字：");
        while(!c.isEmpty()){
            //念1出队
            System.out.println(c.delete());
//            念二出队入队
            if(!c.isEmpty()){
                c.append(c.delete());
            }
        }
    }
}
